
public class Multiplier extends Monster {

    public boolean kill() {
        SkeletonHelper.FunctionBegin(ID, "Multiplier", "kill");
        SkeletonHelper.FunctionEnd(ID, "Multiplier", "kill", "true");
        return true;
    }

  @Override
    public boolean explode() {
        SkeletonHelper.FunctionBegin(ID, "Multiplier", "explode");

        if (SkeletonHelper.Ask("Már robbanok?", "(i) igen, (n) nem").equals("i"))
          return false;

        for (int i = 0; i <= 3; i++) {
            if(!field.getNeighbour(i).isEmpty()){
            field.getNeighbour(i).getEntity().explode();
            }
        }
        SkeletonHelper.FunctionEnd(ID, "Multiplier", "explode", "true");
        return true;
    }

    public void tick() {
        SkeletonHelper.FunctionBegin(ID, "Multiplier", "kill");
        for (int i = 1; i <= 3; i++) {
            if (field.getNeighbour(i).isEmpty()) {
                Multiplier mp = new Multiplier();
                field.getNeighbour(i).add(mp);
                field.getGame().getTimer().add(mp);
            }

        }

        SkeletonHelper.FunctionEnd(ID, "Muliplier", "kill");
    }
}